package cn.hsw.manage.center.mapper;

import cn.hsw.manage.center.entity.RolePermissionCenter;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RolePermissionMapper extends BaseMapper<RolePermissionCenter> {
    @Delete("delete from hsw_manage_role_permission where role_pid = #{rolePid}")
    void deleteByRolePid(@Param("rolePid") Long rolePid);

    @Select("select * from hsw_manage_role_permission where role_pid = #{rolePid}")
    List<RolePermissionCenter> findByRolePid(@Param("rolePid")Long rolePid);
}
